#include <bits/stdc++.h>
using namespace std;

int n;
int a[100005];

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);

    cin>>n;
    for(int i=0;i<n;++i) cin>>a[i];
    sort(a,a+n);
    int l=0,r=0,ans=0;
    for(;l<n;l++){
        for(;r<n;r++) if(a[r]>a[l]) break;
        if(r==n) break;
        ans++;
        r++;
    }
    cout<<n-ans<<endl;
    return 0;
}